package org.budo.weibo.response;

import org.budo.support.http.client.Response;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

/**
 * @author lmw
 */
public class UserShowResponse extends AbstractResponse {
    private static final long serialVersionUID = 8496317462481567193L;

    public UserShowResponse() {}

    public UserShowResponse(Response response) {
        this.setResponse(response);

        String responseBody = response.getBody();
        JSONObject responseJson = JSON.parseObject(responseBody);
        this.setResponseJson(responseJson);
    }

    public String getScreenName() {
        return this.getResponseJson().getString("screen_name");
    }

    public String getAvatarLarge() {
        return this.getResponseJson().getString("avatar_large");
    }
}